package com.ruoyi.channel.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.db.mapper.ChannelRegisterResultInfoMapper;
import com.ruoyi.db.domain.ChannelRegisterResultInfo;
import com.ruoyi.channel.service.IChannelRegisterResultInfoService;

/**
 * 渠道注册结果信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-10-12
 */
@Service
@DataSource(DataSourceType.SLAVE)
public class ChannelRegisterResultInfoServiceImpl implements IChannelRegisterResultInfoService 
{
    @Autowired
    private ChannelRegisterResultInfoMapper channelRegisterResultInfoMapper;

    /**
     * 查询渠道注册结果信息
     * 
     * @param id 渠道注册结果信息主键
     * @return 渠道注册结果信息
     */
    @Override
    public ChannelRegisterResultInfo selectChannelRegisterResultInfoById(Long id)
    {
        return channelRegisterResultInfoMapper.selectChannelRegisterResultInfoById(id);
    }

    /**
     * 查询渠道注册结果信息列表
     * 
     * @param channelRegisterResultInfo 渠道注册结果信息
     * @return 渠道注册结果信息
     */
    @Override
    public List<ChannelRegisterResultInfo> selectChannelRegisterResultInfoList(ChannelRegisterResultInfo channelRegisterResultInfo)
    {
        return channelRegisterResultInfoMapper.selectChannelRegisterResultInfoList(channelRegisterResultInfo);
    }

    /**
     * 查询渠道注册结果信息列表
     *
     * @param channelRegisterResultInfo 渠道注册结果信息
     * @return 渠道注册结果信息
     */
    @Override
    public List<Map<String, Object>> selectChannelRegisterResultInfoMapList(ChannelRegisterResultInfo channelRegisterResultInfo)
    {
        return channelRegisterResultInfoMapper.selectChannelRegisterResultInfoMapList(channelRegisterResultInfo);
    }

    /**
     * 新增渠道注册结果信息
     * 
     * @param channelRegisterResultInfo 渠道注册结果信息
     * @return 结果
     */
    @Override
    public int insertChannelRegisterResultInfo(ChannelRegisterResultInfo channelRegisterResultInfo)
    {
        channelRegisterResultInfo.setCreateTime(DateUtils.getNowDate());
        return channelRegisterResultInfoMapper.insertChannelRegisterResultInfo(channelRegisterResultInfo);
    }

    /**
     * 修改渠道注册结果信息
     * 
     * @param channelRegisterResultInfo 渠道注册结果信息
     * @return 结果
     */
    @Override
    public int updateChannelRegisterResultInfo(ChannelRegisterResultInfo channelRegisterResultInfo)
    {
        channelRegisterResultInfo.setUpdateTime(DateUtils.getNowDate());
        return channelRegisterResultInfoMapper.updateChannelRegisterResultInfo(channelRegisterResultInfo);
    }

    /**
     * 批量删除渠道注册结果信息
     * 
     * @param ids 需要删除的渠道注册结果信息主键
     * @return 结果
     */
    @Override
    public int deleteChannelRegisterResultInfoByIds(Long[] ids)
    {
        return channelRegisterResultInfoMapper.deleteChannelRegisterResultInfoByIds(ids);
    }

    /**
     * 删除渠道注册结果信息信息
     * 
     * @param id 渠道注册结果信息主键
     * @return 结果
     */
    @Override
    public int deleteChannelRegisterResultInfoById(Long id)
    {
        return channelRegisterResultInfoMapper.deleteChannelRegisterResultInfoById(id);
    }
}
